﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using H2.NET.Controls;
using H2.NET.Business;
using H2.NET.Data.Common;
using H2.NET.Data.Common.Validates;
using H2.NET.Data;
using H2.NET.Data.Exceller;

namespace H2.NET.Web.Pages
{
    public partial class TT : TaskPage
    {
        #region 事件 页面加载
        protected void Page_Load(object sender, EventArgs e)
        {
            //System.DateTime date = System.DateTime.Now;
            //System.DateTime date2 = date.AddMinutes(3);

            //long d = (date2.Ticks - date.Ticks) / 600000000;

            //string s = Server.MapPath(@"\");
            //string s2 = Request.PhysicalApplicationPath;

            //InsPlan_I ipi = new InsPlan_I();
            //List<InsPlan_I> list = new List<InsPlan_I>();

            //ExcelMapper em = new ExcelMapper();
            //list = em.Read<InsPlan_I>(ipi, @"c:\Form-039 Inspection Plan V2.0 100827.xls");

            //em.Write<InsPlan_I>(list, @"c:\a.xls", @"c:\Form-039 Inspection Plan template.xls");            
        }
        #endregion

        #region InsPlan_I
        public class InsPlan_I
        {
            
            public string _SAP_Material_Code="";
            public string _Plant = "";
            public string _Material_Description = "";
            public string _IP_Group = "";
            public string _Group_Counter = "";
            public string _Status = "";
            public ArrayList _Arr = new ArrayList();

            [FromCell("A10")]
            [ToCell("A10")]
            public string SAP_Material_Code
            {
                get { return _SAP_Material_Code; }
                set { _SAP_Material_Code = value;}
            }

            [FromCell("C10")]
            [ToCell("C10")]
            public string Plant
            {
                get { return _Plant; }
                set { _Plant = value; }
            }

            [FromCell("D10")]
            [ToCell("D10")]
            public string Material_Description
            {
                get { return _Material_Description; }
                set { _Material_Description = value; }
            }

            [FromCell("G10")]
            [ToCell("G10")]
            public string IP_Group
            {
                get { return _IP_Group; }
                set { _IP_Group = value; }
            }

            [FromCell("H10")]
            [ToCell("H10")]
            public string Group_Counter
            {
                get { return _Group_Counter; }
                set { _Group_Counter = value; }
            }

            [FromCell("I10")]
            [ToCell("I10")]
            public string Status
            {
                get { return _Status; }
                set { _Status = value; }
            }

            [FromRange("A14", "A53")]
            [ToRange("A14", "A53")]
            public ArrayList Arr
            {
                get { return _Arr; }
                set { _Arr = value; }
            }
        }
        #endregion
    }
}
